import React,{useState} from 'react'
import { UserOutlined,NotificationOutlined,SettingOutlined,ShopOutlined } from '@ant-design/icons';
import { Layout, Menu,Affix} from 'antd';
import {Link} from 'react-router-dom';

const { SubMenu } = Menu;
const { Sider } = Layout;

const Navigation = () => {
  const [container, setContainer] = useState(null);
    return (
        <div ref={setContainer}>
          <Affix offsetTop={100}>
            <Sider className="site-layout-background" width={200}>
          <Menu mode="inline" defaultSelectedKeys={['1']} defaultOpenKeys={['sub1']} style={{ height: '100%' }}>
            <SubMenu key="sub5" icon={<ShopOutlined />} title="用户管理">
              <Menu.Item key="1" icon={<UserOutlined />}><Link to="/">用户管理</Link></Menu.Item>
              <Menu.Item key="2" icon={<UserOutlined />}><Link to="/checkmes">打卡内容管理</Link></Menu.Item>
            </SubMenu>
            <SubMenu key="sub6" icon={<ShopOutlined />} title="单词管理">
              <Menu.Item key="20" icon={<ShopOutlined />}><Link to="/word">单词管理</Link></Menu.Item> 
              <Menu.Item key="21" icon={<ShopOutlined />}><Link to="/wordhistory">单词历史管理</Link></Menu.Item> 
            </SubMenu>
            <SubMenu key="sub2" icon={<ShopOutlined />} title="院校管理">
              <Menu.Item key="3"><Link to="/schoolrecruit">招生简章管理</Link></Menu.Item>
              <Menu.Item key="4"><Link to="/schoolscore">分数线管理</Link></Menu.Item>
              <Menu.Item key="5"><Link to="/schoolnumber">报录比管理</Link></Menu.Item>
            </SubMenu>
            <SubMenu key="sub3" icon={<ShopOutlined />} title="百科管理">
              <Menu.Item key="6"><Link to="/examknowledge">考研常识管理</Link></Menu.Item>
              <Menu.Item key="7"><Link to="/exampolicy">考研政策管理</Link></Menu.Item>
              <Menu.Item key="8"><Link to="/examchoose">选择院校管理</Link></Menu.Item>
              <Menu.Item key="9"><Link to="/examguide">备考指南管理</Link></Menu.Item>
              <Menu.Item key="10" icon={<ShopOutlined />}><Link to="/book">参考书管理</Link></Menu.Item> 
            </SubMenu>
            <SubMenu key="sub7" icon={<ShopOutlined />} title="圈子内容管理">
              <Menu.Item key="12" icon={<ShopOutlined />}><Link to="/circle">圈子内容管理</Link></Menu.Item>
              <Menu.Item key="13" icon={<ShopOutlined />}><Link to="/usercoms">圈子内容评论管理</Link></Menu.Item>
            </SubMenu>
            <SubMenu key="sub4" icon={<ShopOutlined />} title="我的内容管理">
              <Menu.Item key="14"><Link to="/usermessage">我的消息管理</Link></Menu.Item>
              <Menu.Item key="15"><Link to="/usercompose">我的创作管理</Link></Menu.Item>
              <Menu.Item key="16"><Link to="/userlike">我的收藏管理</Link></Menu.Item>
              <Menu.Item key="17"><Link to="/userexamhistory">百科浏览记录管理</Link></Menu.Item>
              <Menu.Item key="18"><Link to="/userstudyhistory">学习浏览记录管理</Link></Menu.Item>
            </SubMenu>
            <Menu.Item key="19" icon={<SettingOutlined />}><Link to="/admin">系统管理</Link></Menu.Item> 
          </Menu>
        </Sider>
        </Affix>
        </div>
    )
}

export default Navigation
